﻿using System;
using System.Runtime.Serialization;

namespace NazTek.Utility
{
    /// <summary>
    /// Custom exception
    /// </summary>
    [Serializable]
    public sealed class CustomException : Exception, ISerializable
    {
        /// <summary>
        /// Delegates to base constructor
        /// </summary>
        public CustomException() : base() { }
        /// <summary>
        /// Delegates to base constructor
        /// </summary>
        /// <param name="message">Excepion message</param>
        public CustomException(string message) : base(message) { }
        /// <summary>
        /// Delegates to base constructor
        /// </summary>
        /// <param name="message">Excepion message</param>
        /// <param name="innerException">Inner exception</param>
        public CustomException(string message, Exception innerException) : base(message, innerException) { }
        /// <summary>
        /// Delegates to base constructor
        /// </summary>
        /// <param name="info">The System.Runtime.Serialization.SerializationInfo that holds the serialized 
        /// object data about the exception being thrown.</param>
        /// <param name="context">The System.Runtime.Serialization.StreamingContext that contains contextual 
        /// information about the source or destination.</param>
        private CustomException(SerializationInfo info, StreamingContext context) : base(info, context) { }
    }
}
